home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Reference Guide / C-C++ Interactive Reference Guide.iso / c_ref / csource4 / 249_01 / csrupdt.doc < prev    next >
Text File  |  1987-10-29  |  89KB  |  4,159 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.         C Spot Run
  20.  
  21.         A User-Supported C Add-On Library
  22.  
  23.         Version 2.1
  24.  
  25.         July 12, 1987
  26.  
  27.  
  28.         Bob Pritchett
  29.         New Dimension Software
  30.  
  31.         23 Pawtucket Dr.
  32.         Cherry Hill, NJ 08003
  33.  
  34.  
  35.         Copyright 1986, 1987 Bob Pritchett
  36.         All Rights Reserved
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.                                  To Mom and Dad
  83.  
  84.                    Your time, effort, encouragement and advice
  85.                      have been far above and beyond what any
  86.                            son could dream of asking.
  87.  
  88.                                      and to
  89.  
  90.                                   The Memory of
  91.                                Thelma M. Pritchett
  92.  
  93.                         Your greatest works are the lives
  94.                             of everyone who knew you.
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.                                    Trademarks
  108.  
  109.          MS-DOS and Microsoft C are trademarks of Microsoft Corporation.
  110.             IBM-PC is a trademark of International Business Machines.
  111.               C Spot Run is a trademark of New Dimension Software.
  112.                 Turbo C is a trademark of Borland International.
  113.                 C86 is a trademark of Computer Innovations, Inc.
  114.                      Lattice is a trademark of Lattice, Inc.
  115.  
  116.  
  117.                                    Disclaimer
  118.  
  119.              This  library and all of its contents are provided "AS  IS."  
  120.         No  warranty is expressed or implied.  Use of this library is  at 
  121.         the  user's  own risk,  and the authors are not  liable  for  any 
  122.         damages  or loss of profits resulting from the use of the library 
  123.         or its documentation.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.                           C Spot Run - Documentation  
  134.  
  135.  
  136.  
  137.                                 Table of Contents
  138.  
  139.             Dedication...............................................  2
  140.             Trademarks...............................................  2
  141.             Disclaimer...............................................  2
  142.  
  143.          1. Introduction.............................................  3
  144.             1.1. What is C Spot Run?.................................  3
  145.             1.2. Why C Spot Run?.....................................  3
  146.  
  147.          2. Obtaining and Copying C Spot Run.........................  4
  148.             2.1. User Supported Software.............................  4
  149.             2.2. Ownership of C Spot Run.............................  4
  150.             2.3. Contents of C Spot Run..............................  4
  151.             2.4. License for C Spot Run..............................  4
  152.             2.5. Using C Spot Run in a Commercial Application........  5
  153.  
  154.          3. Using the C Spot Run Library.............................  6
  155.             3.1. Using the Library with Your Compiler................  6
  156.             3.2. Modifying the Library...............................  6
  157.                  3.2.1. Problem Areas................................  6
  158.                  3.2.2. Helpful Suggestions..........................  6
  159.             3.3. Using the Utilities and Aids........................  7
  160.  
  161.          4. Format of Routine/Utility Descriptions...................  8
  162.             4.1. How to Use Routine Description Pages................  8
  163.             4.2. How to Use Utility Decription Pages.................  8
  164.  
  165.          5. The Library Routine Descriptions.........................
  166.             5.1. General Descriptions of Related Routines............
  167.                  5.1.1. Date Manipulation Routines...................
  168.                  5.1.2. Directory Management Routines................
  169.                  5.1.3. Graphics Routines............................
  170.                  5.1.4. Input Routines...............................
  171.                  5.1.5. Printer Operation Routines...................
  172.                  5.1.6. Real Time Timers.............................
  173.                  5.1.7. Sound Routines...............................
  174.                  5.1.8. Window Function Library......................
  175.             5.2. Individual Routine Descriptions.....................
  176.  
  177.          6. Utility and Aid Descriptions.............................
  178.  
  179.          7. Header File Descriptions.................................
  180.  
  181.          8. Appendix A - Updating the Library........................
  182.  
  183.          9. Appendix B - Contacting Authors..........................
  184.  
  185.         10. Appendix C - Submitting Routines or Utilities............
  186.  
  187.         11. Appendix D - Library History and Changes.................
  188.  
  189.         12. Appendix E - ASCII Table.................................
  190.  
  191.  
  192.  
  193.                                                            Page 3
  194.  
  195.  
  196.  
  197.  
  198.  
  199.                           C Spot Run - Documentation  
  200.  
  201.  
  202.         13. Appendix F - Window Border Characters....................
  203.  
  204.         14. Quick Reference Chart....................................
  205.  
  206.         15. Commonly Asked Questions and Answers.....................
  207.  
  208.         16. Routine/Utility Submission Form..........................
  209.  
  210.         17. User Response Form.......................................
  211.  
  212.         18. Order Form...............................................
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.                                                            Page 4
  260.  
  261.  
  262.  
  263.  
  264.  
  265.                           C Spot Run - Documentation  
  266.  
  267.  
  268.         1. Introduction
  269.  
  270.            1.1.  What is C Spot Run?
  271.  
  272.              C  Spot  Run is a library of C and Assembly routines  for  C 
  273.         programmers.   These  routines supplement the standard  libraries 
  274.         provided  with  compilers,  and  provide  tools  for  specialized 
  275.         applications.
  276.              All routines in this library are either in the public domain 
  277.         or  are  part of the user supported software world,  as  are  the 
  278.         accompanying utilities and programming aids.  
  279.              Our  goal  is  to  provide low  cost  (free!)  routines  and 
  280.         utilities  for  C programmers.   The use of pre-written  routines 
  281.         greatly reduces the amount of tedious code writing in almost  any 
  282.         situation, and we hope that our collection will prove to do so.
  283.  
  284.            1.2.  Why C Spot Run?
  285.  
  286.              What  is  probably the next question to cross your  mind  is 
  287.         simply,  why?   Good question,  and I hope this is a good answer.  
  288.         Because.   Because  there  are so many libraries similar to  this 
  289.         one.  Because they all cost money, and this one doesn't.  Because 
  290.         as of yet there is no central distribution point for many of  the 
  291.         C routines floating around in .C files everywhere.   We feel that 
  292.         C Spot Run is filling a need, and we hope you agree with us.   
  293.              We  would  appreciate your taking some time to let  us  know 
  294.         what you think of the library and what directions you would  like 
  295.         to see it take.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.                                                            Page 5
  326.  
  327.  
  328.  
  329.  
  330.  
  331.                           C Spot Run - Documentation  
  332.  
  333.  
  334.         2. Obtaining and Copying C Spot Run
  335.  
  336.            2.1. User Supported Software
  337.  
  338.              User  supported software is software distributed at no  cost 
  339.         other  then a small media charge with the expectation that  those 
  340.         who   find  it  useful  will  send  a  donation  to  support  the 
  341.         development.    In   most  cases  those  who  contribute   become 
  342.         registered users and receive automatic updates,  printed manuals, 
  343.         telephone support, and/or source code.
  344.              
  345.            2.2. Ownership of C Spot Run
  346.  
  347.              Without  a major essay on copyright laws,  the routines  and 
  348.         utilities  in  this package are the property of their  respective  
  349.         authors,  with  the  exception of those released  to  the  Public 
  350.         Domain (PD).  It is important to recognize the difference between 
  351.         Public   Domain  and  user-supported  software.   (User-supported 
  352.         includes  "ShareWare",   "FreeWare"  and  several  other  names.)  
  353.         Unlike  authors  who totally give their software  to  the  public 
  354.         domain,  some  authors  distribute  their  code  with  a  limited 
  355.         license,  usually  something  to the effect that you are  not  to 
  356.         distribute modified versions or charge for the distribution.  
  357.              The  routines  and  utilities  in this  library  are  either 
  358.         totally in the public domain,  in which case their source code is 
  359.         present,  or have been released to this library for  distribution 
  360.         as described in Appendix C of this document.
  361.              As to the library itself,  and this documentation,  they are 
  362.         property  of Bob Pritchett,  and released to the public under the 
  363.         limited license in section 2.4.
  364.  
  365.            2.3. Contents of C Spot Run
  366.  
  367.              The  very  basic  principle  behind this  library  is  user-
  368.         supported software.   In addition to monetary  contributions,  an 
  369.         even  more valuable form is that of routines or utilities.   Most 
  370.         of the routines and utilities in this library were written by two 
  371.         or  three people,  or are modifications of other routines in  the 
  372.         public domain.
  373.              We would like to build a sizable library of tools and  helps 
  374.         for C programmers,  and whether it is a new routine you wrote, or 
  375.         one that is already in the public domain world, your contribution 
  376.         of code and permission to let us use it would be appreciated.
  377.              At  present  this library is a collection  of  routines  and 
  378.         programming aids only.  Since the release of the first version of 
  379.         the   library,   the   response  has  been  positive,   and   our 
  380.         interpretation of it is that the library should continue to focus 
  381.         on  routines  and  programming aids,  as opposed  to  creating  a 
  382.         library of general C source code.
  383.  
  384.            2.4. Distribution License for C Spot Run
  385.  
  386.              The  C  Spot Run library of routines and  utilities  may  be 
  387.         freely duplicated and distributed under the following terms:
  388.  
  389.  
  390.  
  391.                                                            Page 6
  392.  
  393.  
  394.  
  395.  
  396.  
  397.                           C Spot Run - Documentation  
  398.  
  399.  
  400.  
  401.              o  No fee may be charged other than  reasonable expenses for 
  402.         media and reproduction, no more then eight dollars.
  403.  
  404.              o   The  library  MAY NOT be distrbuted  by  any  for-profit 
  405.         corporation,  including,  but  not limited to,  for-profit public 
  406.         domain software companies, without the express written permission 
  407.         of Bob Pritchett.
  408.  
  409.              o  The routines,  utilities, and documentation are not to be 
  410.         distributed in a modified form.
  411.  
  412.              o   The  routines  and  utilities are  not  to  be  used  in 
  413.         commercial  applications  or  business environments  without  the 
  414.         express written permission of the authors.
  415.  
  416.              o   Credit must be given to authors whose routines are  used 
  417.         in  any  distributed application,  in both the code  and  program 
  418.         documentation,  unless  other arrangements are made directly with 
  419.         the author.
  420.  
  421.            2.5. Using C Spot Run in a Commercial Application
  422.  
  423.              You  are  free  to use parts of C Spot Run in  a  commercial 
  424.         application,  on the following conditions:   You must purchase  a 
  425.         copy  of the source code to C Spot Run at the commercial  license 
  426.         fee  ($75),  becoming a registered user.   You may not distribute 
  427.         any  part  of C Spot Run in a humanly readable  form.   You  must 
  428.         include  the following statement in your application source  code 
  429.         and  documentation:   "Portions of this program  Copyright  1986, 
  430.         1987  New  Dimension  Software."   Additionally,   New  Dimension 
  431.         Software  must  be notified of any commercial  programs  released 
  432.         using the C Spot Run library.  
  433.              These conditions are meant for my protection, curiosity, and 
  434.         to assure that my work isn't used without credit.   If you have a 
  435.         difficulty with any of them,  please contact me and we can try to 
  436.         work something out.   (Along the lines of my curiosity,  I  would 
  437.         like  to  see how the library is put to use,  and if you want  to 
  438.         send me a copy of the programs you write with it, I won't mind.)
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.                                                            Page 7
  458.  
  459.  
  460.  
  461.  
  462.  
  463.                           C Spot Run - Documentation  
  464.  
  465.  
  466.         3. Using the C Spot Run Library
  467.  
  468.            3.1. Using the Library with Your Compiler
  469.  
  470.              All  utilities  included in this library work with  straight 
  471.         ASCII text files,  unless otherwise specified,  and those dealing 
  472.         with the syntax of the C language should work with all flavors of 
  473.         C that conform to the basic guidelines in K&R. 
  474.              The  routines  are distributed  in  several  forms,  usually 
  475.         either  object  code or source code,  C  or  assembly.   Specific 
  476.         information  on  each routine and it's compiler  dependancies  is 
  477.         available  in  the  section entitled Compiler Specifics  in  each 
  478.         routine  entry.  The  object  code in the libraries  provided  is 
  479.         specific to a particular compiler, either Microsoft C or Turbo C.  
  480.         These  libraries  and object code modules can be linked  to  your 
  481.         program  with  the proper linker,  LINK or TLINK.   If  you  have 
  482.         another  brand  compiler that is compatible with either of  these 
  483.         object code formats you may be sucessful in linking the routines.  
  484.         Keep  in  mind  that Microsoft and Turbo C  prepend  identifiers, 
  485.         including function names,  with underscores.   If the source code 
  486.         is  available  simply check it for compiler differences (see  the 
  487.         next section) and compile it with whatever compiler you use.
  488.  
  489.            3.2. Modifying the Library
  490.  
  491.              Although  many compilers use the same routines,  they  often 
  492.         are  named  differently,  or use a different set  of  parameters.  
  493.         This section should be of assistance in modifying source to  work 
  494.         with  your,  or  someone  else's,  compiler.   If you  have  some 
  495.         information that could be helpful in compiler conversions, please 
  496.         contact us.
  497.  
  498.                 3.2.1. Problem Areas
  499.  
  500.              Some  of the more common differences in  compiler  libraries 
  501.         are the naming conventions used.   For instance,  the routines to 
  502.         perform  a DOS interrupt vary from intdos() to doint(),  and have 
  503.         just as many differences in parameters.   Some common differences 
  504.         are  in string manipulation,  hardware  specific  functions,  and 
  505.         memory  management.   Here is some information that should be  of 
  506.         help:
  507.  
  508.                 3.2.2. Helpful Suggestions
  509.  
  510.              Microsoft  V4.0 uses unions declared in DOS.H as  parameters 
  511.         for it's hardware/DOS functions unlike most other compilers which 
  512.         need  the  register variables etc.  declared by  the  user.   The 
  513.         register  variables are stored in a union of type REGS,  and  are 
  514.         addressed  using the union member x to access registers with x as 
  515.         a second character,  or h to access the registers ending in h  or 
  516.         l.  Example: union REGS in;  n = in.x.ax;  y = in.h.bl;
  517.  
  518.              Microsoft's hardware interrupt is int86(int,&in,&out),  cor-
  519.         responding  to sysint(int,&in,&out) used by many other compilers.  
  520.         Likewise intdos(&in,&out) corresponds to sysint(0x21,&in,&out).
  521.  
  522.  
  523.                                                            Page 8
  524.  
  525.  
  526.  
  527.  
  528.  
  529.                           C Spot Run - Documentation  
  530.  
  531.  
  532.  
  533.              Lattice/Computer  Innovation's  movmem(source,  destination, 
  534.         width) corresponds to Microsoft's  movedata(destination,  source, 
  535.         width).
  536.  
  537.              Turbo  C is almost completely compatible with  Microsoft  C, 
  538.         with a few small exceptions.   For example, Microsoft's inp() and 
  539.         outp()  are named inport() and outport(),  and some header  files 
  540.         differ slightly in name.
  541.  
  542.            3.3. Using the Utilities and Aids
  543.  
  544.              The  use of utilities and programming aids should be clearly 
  545.         described on their description pages.   All include files  should 
  546.         be  included at the beginning of sources that need them,  and  in 
  547.         addition  to the description page most independant utilities will 
  548.         provide  a  short summary of their use when run with  no  command 
  549.         line parameters.
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.                                                            Page 9
  590.  
  591.  
  592.  
  593.  
  594.  
  595.                           C Spot Run - Documentation  
  596.  
  597.  
  598.         4. Format of Routine/Utility Descriptions
  599.  
  600.            4.1. How to Use the Routine Description Pages
  601.  
  602.              The  routine  description pages are set up in such a  manner 
  603.         that  updates  to  the library will not  require  a  totally  new 
  604.         manual.  
  605.              Each  routine has its own full page regardless of how  small 
  606.         or large it is.   The page is set up in a special order, with the 
  607.         name of the routine on the upper right of the page at the top for 
  608.         quick  indexing,  followed  by a short summary of  the  necessary 
  609.         arguments  and their data types.   Next is a line containing  the 
  610.         creation  and last update dates,  and then the author's name  and 
  611.         whether  the  source is in C or Assembly.   Following these is  a 
  612.         list of the files in which the code is contained, a list of other 
  613.         required functions that may not be in every library,  and then  a 
  614.         paragraph  description of the function.   This is followed with a 
  615.         paragraph  explaining  any ties to  one  specific  compiler,  the 
  616.         return value,  a list of related functions in the library,  and a 
  617.         final example of how it might be used in a portion of code.
  618.              It  is  recommended that you keep the complete manual  in  a 
  619.         three  ring binder,  and as you receive updates simply print  out 
  620.         the enclosed page,  and insert it in alphabetical order among the 
  621.         function  description pages.   (This manual may seem like a waste 
  622.         of paper, but this way it saves a lot in the long run.)
  623.  
  624.            4.2. How to Use the Utility Description Pages
  625.  
  626.              The  utility  description pages are similar to  the  routine 
  627.         descriptions   described   above  except  for   the   layout   of 
  628.         information.  On the utility description pages the first item is, 
  629.         as  with the routine descriptions,  the utility name on the upper 
  630.         right  hand corner.   Next is a summary of the utility  including 
  631.         the creation and last update dates, the author's name, the source 
  632.         language,  and then a copy of the documentation, usually an exact 
  633.         duplicate of whatever documentation the author has sent.
  634.              As  mentioned,  the  method for updating  these  description 
  635.         pages is the same as above in section 4.1.
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.                                                            Page 10
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.                                  Sound Functions
  665.  
  666.              The sound functions provided with C Spot Run can be used  to 
  667.         make sound 'while you wait' or in an interrupt driven  background 
  668.         mode.
  669.              The  sound() function will play the note given for the  time 
  670.         specified  and return when complete, or, in background mode,  put 
  671.         the  note into the sound buffer and return immediately.  (If  the 
  672.         buffer is full, sound() will wait until there is room.)
  673.              The  play() function uses the sound() function and  whatever 
  674.         mode it is set to.
  675.  
  676.              Background mode is set by calling the sound_init() function, 
  677.         and  terminated  by calling sound_done().  It is  VERY  important 
  678.         that  sound_done() is called before any program terminates.   The 
  679.         sound_quiet()   and  sound_left()  functions  can  be  used   for 
  680.         manipulation of the background sound buffer.
  681.  
  682.              The  spkr_<on|off|freq>()  functions  directly  control  the 
  683.         speaker.   A  frequency  can  be  loaded  with  the   spkr_freq() 
  684.         function, started with the spkr_on() function, and stopped by the 
  685.         spkr_off() function.
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.                                                                 beep
  731.         Summary:
  732.  
  733.         void beep();
  734.  
  735.         Created: 07/02/87        Last Updated: 07/02/87
  736.  
  737.         Author: Bob Pritchett         Source (C/A): C
  738.  
  739.         Located in: CSRBEEP.OBJ
  740.  
  741.         Requires: sound()
  742.  
  743.         Description:
  744.  
  745.         This  function outputs a 'less offensive' beep than the  standard 
  746.         Control-G beep.  Additionally you can change the tone and length, 
  747.         with the setbeep() function.  (Note:  All 'beeping' by other  CSR 
  748.         functions is now done with this function.)
  749.  
  750.         Compiler Specifics:
  751.  
  752.         None.
  753.  
  754.         Return Value:
  755.  
  756.         Nothing.
  757.  
  758.         See Also:
  759.  
  760.         setbeep() sound()
  761.  
  762.         Example:
  763.  
  764.         /* ... */
  765.            else                         /* If not acceptable input... */
  766.               beep();                   /* beep to indicate error. */
  767.         /* ... */
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.                                                                 cbox
  797.         Summary:
  798.  
  799.         int cbox(x,y,x2,y2,type);
  800.         int x;                   /* Upper Left Row */
  801.         int y;                   /* Upper Left Col */
  802.         int x2;                  /* Lower Right Row */
  803.         int y2;                  /* Lower Right Col */
  804.         int type;                /* Style of Border */
  805.  
  806.         Created: 03/03/86        Last Updated: 07/09/87
  807.  
  808.         Author: Bob Pritchett         Source (C/A): C
  809.  
  810.         Located in: CBOX.OBJ
  811.  
  812.         Requires: putchci() gotoxy()
  813.  
  814.         Description:
  815.  
  816.         This  function  is functionaly the same as box() except that  the 
  817.         box  is drawn in the current color.   It is primarily used as  an 
  818.         internal routine in COUTPUT.OBJ.  For independant use, use color() 
  819.         or wcolor() to set the color. 
  820.  
  821.         Compiler Specifics:
  822.  
  823.         None.
  824.  
  825.         Return Value:
  826.  
  827.         Returns  a  one  if  successful,   a  negative  one  if   invalid 
  828.         coordinates are passed.
  829.  
  830.         See Also:
  831.  
  832.         color() wcolor() box()
  833.  
  834.         Example:
  835.  
  836.         #include <color.h>       /* Just for the colors... */
  837.  
  838.         color(RED_F,WHT_B);      /* Red on White */
  839.  
  840.         cbox(5,5,20,60,1);       /* A box with a single line border */
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.                                                               chline
  863.         Summary:
  864.  
  865.         int chline(x,y,y2,type);
  866.         int x;                   /* Upper Left Row */
  867.         int y;                   /* Upper Left Col */
  868.         int y2;                  /* Lower Right Col */
  869.         int type;                /* Style of Border */
  870.  
  871.         Created: 03/03/86        Last Updated: 07/09/87
  872.  
  873.         Author: Bob Pritchett         Source (C/A): C
  874.  
  875.         Located in: CHLINE.OBJ
  876.  
  877.         Requires: putchci() gotoxy()
  878.  
  879.         Description:
  880.  
  881.         This  function  will  draw  a  line at  x,y  to  x,y2  using  the 
  882.         character(s) specified in type.   Type may be any one of the five 
  883.         types  accepted by box().   Usually this function is used to draw 
  884.         lines  inside boxes,  as it will use the proper side  characters, 
  885.         but by using an ASCII character in type an ordinary line of  that 
  886.         character is drawn.   The line is drawn in the current color,  as 
  887.         specified by color().
  888.  
  889.         Compiler Specifics:
  890.  
  891.         None.
  892.  
  893.         Return Value:
  894.  
  895.         Returns  a  one  if  successful,   a  negative  one  if   invalid 
  896.         coordinates are passed.
  897.  
  898.         See Also:
  899.  
  900.         cvline() whline()
  901.  
  902.         Example:
  903.  
  904.         #include <color.h>       /* Just for the colors... */
  905.  
  906.         color(RED_F,WHT_B);      /* Red on White */
  907.  
  908.         cbox(5,5,20,60,1);       /* A box with a single line border */
  909.  
  910.         chline(5,7,60,1);        /* Draws a line across the box */
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.                                                               clreol
  929.         Summary:
  930.  
  931.         int clreol();
  932.  
  933.         Created: 07/10/87        Last Updated: 07/10/87
  934.  
  935.         Author: Bob Pritchett         Source (C/A): C
  936.  
  937.         Located in: CLREOL.OBJ
  938.  
  939.         Requires: gotoxy() putchci() cursor_read()
  940.  
  941.         Description:
  942.  
  943.         This  function reads the current cursor position and  clears,  in 
  944.         the  color set by the color() function, the line from the  cursor 
  945.         to  column 80.  The cursor is returned to the location it was  at 
  946.         before the function was called.
  947.  
  948.         Compiler Specifics:
  949.  
  950.         None.
  951.  
  952.         Return Value:
  953.  
  954.         Nothing.
  955.  
  956.         See Also:
  957.  
  958.         cls() gotoxy() cursor_read() color()
  959.  
  960.         Example:
  961.  
  962.         gotoxy(7,10);
  963.         clreol();
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.                                                                color
  995.         Summary:
  996.  
  997.         #include <color.h>       /* For Color Definitions Only */
  998.  
  999.         int color(attr)
  1000.         int attr;                /* Color Attributes */
  1001.  
  1002.         Created: 03/03/86        Last Updated: 07/09/87
  1003.  
  1004.         Author: Bob Pritchett         Source (C/A): C
  1005.  
  1006.         Located in: CSRCOLOR.OBJ
  1007.  
  1008.         Requires: Nothing.
  1009.  
  1010.         Description:
  1011.  
  1012.         This  routine  sets  the  colors  to be  used  in  all  following 
  1013.         operations  involving  color  in  the  windows  package,   unless 
  1014.         otherwise  specified.    In  version  1.0  color()  required  two 
  1015.         arguments,  the  fore  and background  attributes.   To  maintain 
  1016.         compatibility  with other <x>color() routines,  there is now only 
  1017.         one argument, with the attributes added together.
  1018.  
  1019.         If  color()'s  argument is -1,  it returns the current value  for 
  1020.         color operations.   This is useful if you wish to write windowing 
  1021.         functions that restore the current color attributes after opening 
  1022.         their own windows.
  1023.  
  1024.         Compiler  Specifics:
  1025.  
  1026.         None.
  1027.  
  1028.         Return Value:
  1029.  
  1030.         The color is returned.
  1031.  
  1032.         See Also:
  1033.  
  1034.         wcolor() mcolor()
  1035.  
  1036.         Example:
  1037.  
  1038.         #include <color.h>
  1039.  
  1040.         color(RED_F+BOLD+BLU_B);      /* Bold Red on Blue. */
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.                                                               cvline
  1061.         Summary:
  1062.  
  1063.         int cvline(y,x,x2,type);
  1064.         int y;                   /* Upper Left Col */
  1065.         int x;                   /* Upper Left Row */
  1066.         int x2;                  /* Lower Right Row */
  1067.         int type;                /* Style of Border */
  1068.  
  1069.         Created: 03/03/86        Last Updated: 07/09/87
  1070.  
  1071.         Author: Bob Pritchett         Source (C/A): C
  1072.  
  1073.         Located in: CVLINE.OBJ
  1074.  
  1075.         Requires: putchci() gotoxy()
  1076.  
  1077.         Description:
  1078.  
  1079.         This  function  will  draw  a  line at  x,y  to  x2,y  using  the 
  1080.         character(s) specified in type.   Type may be any one of the five 
  1081.         types  accepted by box().   Usually this function is used to draw 
  1082.         lines  inside  boxes,  as it will use the proper top  and  bottom 
  1083.         characters,  but by using an ASCII character in type an  ordinary 
  1084.         line  of  that  character is drawn.   The line is  drawn  in  the 
  1085.         current color, as specified by color().
  1086.  
  1087.         Compiler Specifics:
  1088.  
  1089.         None.
  1090.  
  1091.         Return Value:
  1092.  
  1093.         Returns  a  one  if  successful,   a  negative  one  if   invalid 
  1094.         coordinates are passed.
  1095.  
  1096.         See Also:
  1097.  
  1098.         chline() wvline()
  1099.  
  1100.         Example:
  1101.  
  1102.         #include <color.h>       /* Just for the colors... */
  1103.  
  1104.         color(RED_F,WHT_B);      /* Red on White */
  1105.  
  1106.         cbox(5,5,20,60,1);       /* A box with a single line border */
  1107.  
  1108.         cvline(7,5,20,1);        /* Draws a line down the box */
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.                                                             fbreakon
  1127.         Summary:
  1128.  
  1129.         #include <skey.h>        /* Needed Only for Key Descriptions */
  1130.  
  1131.         int fbreakon(x);
  1132.         int x;                   /* Special Key to Break On */
  1133.  
  1134.         Created: 06/29/87        Last Updated: 06/29/87
  1135.  
  1136.         Author: Bob Pritchett         Source (C/A): C
  1137.  
  1138.         Located in: FINPUT.OBJ
  1139.  
  1140.         Requires: Nothing.
  1141.  
  1142.         Description:
  1143.  
  1144.         This  function  allows the programmer to set which  special  keys 
  1145.         will cause the finptstred() to exit.  Each call to this  function 
  1146.         adds the argument given to the list of break keys.  (The #include 
  1147.         file  SKEY.H  contains easy definitions for  the  special  keys.)  
  1148.         When given zero as an argument the list is cleared.
  1149.  
  1150.         The default break keys are HOME, END, PGUP, PGDN, UARROW, DARROW, 
  1151.         ALTE, ALTX, and ALTQ.
  1152.  
  1153.         Compiler Specifics:
  1154.  
  1155.         None.
  1156.  
  1157.         Return Value:
  1158.  
  1159.         Nothing is returned.
  1160.  
  1161.         See Also:
  1162.  
  1163.         wfbreakon() finptstred()
  1164.  
  1165.         Example:
  1166.  
  1167.         #include <skey.h>
  1168.  
  1169.         char temp[30];
  1170.  
  1171.         fbreakon(0);                    /* Clear List */
  1172.         fbreakon(ALTH);                 /* Alt-H Only */
  1173.  
  1174.         if ( finptstred(10,10,25,temp,"Default") == ALTH )
  1175.            help();
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.                                                           finptstred
  1193.         Summary:
  1194.  
  1195.         int finptstred(rw,cl,mx,str,def);
  1196.         int rw;                  /* Row of Field */
  1197.         int cl;                  /* Column of Field */
  1198.         int mx;                  /* Length of Field */
  1199.         char *str;               /* Where to Place Input */
  1200.         char *def;               /* Default String */
  1201.  
  1202.         Created: 10/18/86        Last Updated: 06/29/87
  1203.  
  1204.         Author: Bob Pritchett         Source (C/A): C
  1205.  
  1206.         Located in: FINPUT.OBJ
  1207.  
  1208.         Requires: gotoxy() cfield()
  1209.  
  1210.         Description:
  1211.  
  1212.         This  powerful function displays the field specified  and  places 
  1213.         the  default  string  within  it, and the  cursor  at  the  first 
  1214.         character  of  this string.  The default string may  be  returned 
  1215.         with a carriage return as the first character, it may be  editted 
  1216.         with the left and right arrow keys and ins and del, the field may 
  1217.         be  erased with the Alt-X combination, and the default input  can 
  1218.         be  restored with the Alt-D combination.  Editting  is  performed 
  1219.         with  the  ins and del keys in combination with movement  by  the 
  1220.         left  and  right arrow keys.  The insert key will  toggle  insert 
  1221.         'mode' on and off, although the cursor will not reflect the  mode 
  1222.         change.   When in insert mode all characters to the right of  the 
  1223.         cursor  will  move right (and possibly scroll out of  the  field) 
  1224.         when  characters  are  inputted.   The del  key  will  erase  the 
  1225.         character the cursor rests on and move everything to the right of 
  1226.         the cursor left one space.  In order to allow for design of  full 
  1227.         input  screens  the function will return with the  input  in  the 
  1228.         appropriate location and the value of the key as the return value 
  1229.         if  one  of  several extended function keys  is  entered.   These 
  1230.         special  keys are those on the break list, which is  modified  by 
  1231.         the fbreakon() function.  (The list of default keys is under  the 
  1232.         description of this routine.) 
  1233.  
  1234.         Compiler Specifics:
  1235.  
  1236.         None.
  1237.  
  1238.         Return Value:
  1239.  
  1240.         A  one is returned unless input was terminated by a special  key, 
  1241.         in which case its value will be returned.  (Special keys return a 
  1242.         null followed by an integer.  The integer is returned here.)
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.                                                           finptstred
  1259.  
  1260.  
  1261.         See Also:
  1262.  
  1263.         inptstr() finptint() wfinptintd() ffill() finptstr() 
  1264.         wfinptstred() fbreakon()
  1265.  
  1266.         Example:
  1267.  
  1268.         char temp[80];
  1269.         int x;
  1270.  
  1271.         x = finptstred(10,10,25,temp,"C Spot Run");
  1272.  
  1273.         if ( x != 1 )                 /* Special Value */
  1274.            process(x);                /* Process Key */
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.                                                                 play
  1325.         Summary:
  1326.  
  1327.         int play(mstr);
  1328.         char *mstr;              /* Music String to Play */
  1329.  
  1330.         Created: 02/20/86        Last Updated: 07/05/87
  1331.  
  1332.         Author: Paul Canniff          Source (C/A): A
  1333.  
  1334.         Located in: CSRPLAY.OBJ
  1335.  
  1336.         Requires: sound()
  1337.  
  1338.         Description:
  1339.  
  1340.         This  function plays a music string using the  sound()  function, 
  1341.         meaning that fore/background mode is determined by sound().
  1342.  
  1343.         The  format  for  the  string is the  same  as  that  of  BASICA.  
  1344.         Summarized, the following options are available:  (Lengths are  1 
  1345.         for whole note, 2 for half, 4 for quarter, etc.)
  1346.  
  1347.             A-G[x][.]   Play the note in the current octave.  The  length 
  1348.                         can  be  set by x, or the default is  used.   The
  1349.                         note may be dotted.
  1350.             L<x>        Sets the default length.
  1351.             M<N|L|S>    Sets mode.  (Normal, Legato, Staccato.)
  1352.             N<x>        Plays note x.  (0..84)  Default values used.
  1353.             O<x>        Sets the octave, from 0 to 7.
  1354.             P[x][.]     Pauses for a specified time.
  1355.             T<x>        Sets the tempo, from 32 to 255.
  1356.             <           Go down one octave.
  1357.             >           Go up one octave.
  1358.  
  1359.         (Note:  The timing may need to be played with for your  hardware.  
  1360.         Try adjusting the tempo.)
  1361.  
  1362.         Compiler Specifics:
  1363.  
  1364.         None.
  1365.  
  1366.         Return Value:
  1367.  
  1368.         Nothing.
  1369.  
  1370.         See Also:
  1371.  
  1372.         sound() sound_init() sound_done()
  1373.  
  1374.         Example:
  1375.  
  1376.         play("MLc2.d ab>cd<ep2fgab");        /* Some Noise */
  1377.                 /* See CSRDEMO.C for a real example. */
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.                                                              pmclose
  1391.         Summary:
  1392.  
  1393.         void pmclose(mn);
  1394.         int mnu;                 /* Menu to Close */
  1395.  
  1396.         Created: 07/02/87        Last Updated: 07/03/87
  1397.  
  1398.         Author: Bob Pritchett         Source (C/A): C
  1399.  
  1400.         Located in: CSRMENU.OBJ
  1401.  
  1402.         Requires: Nothing.
  1403.  
  1404.         Description:
  1405.  
  1406.         This  function  will  close the window associated  with  the  mnu 
  1407.         pointer and free any memory allocated for it.
  1408.  
  1409.         Compiler Specifics:
  1410.  
  1411.         None.
  1412.  
  1413.         Return Value:
  1414.  
  1415.         Nothing.
  1416.  
  1417.         See Also:
  1418.  
  1419.         pmopen() pmrun() pmenu() pop_menu()
  1420.  
  1421.         Example:
  1422.  
  1423.         char *stuff[3] = 
  1424.          {
  1425.           "Option 1",
  1426.           "Second Option",
  1427.           "Your Third Choice"
  1428.          };
  1429.  
  1430.         main()
  1431.          {
  1432.           int m;
  1433.           int x;
  1434.           m = pmopen(10,10,"[ Menu ]",3,stuff,1);
  1435.           x = pmrun(m);
  1436.           pmclose(m);
  1437.           printf("\nMenu Choice %d Chosen.\n");
  1438.          }
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.                                                              pmcolor
  1457.         Summary:
  1458.  
  1459.         void pmcolor(nm,bd,br);
  1460.         int nm;                  /* Menu's Inside Color */
  1461.         int bd;                  /* Menu's Border Color */
  1462.         int br;                  /* Highlight Bar Color */
  1463.  
  1464.         Created: 07/05/87        Last Updated: 07/05/87
  1465.  
  1466.         Author: Bob Pritchett         Source (C/A): C
  1467.  
  1468.         Located in: CSRMENU.OBJ
  1469.  
  1470.         Requires: Nothing.
  1471.  
  1472.         Description:
  1473.  
  1474.         This  function  sets the colors used for by menu's  created  with 
  1475.         pmopen() and run with pmrun().
  1476.  
  1477.         Compiler Specifics:
  1478.  
  1479.         None.
  1480.  
  1481.         Return Value:
  1482.  
  1483.         Nothing.
  1484.  
  1485.         See Also:
  1486.  
  1487.         pmopen() pmrun()
  1488.  
  1489.         Example:
  1490.  
  1491.         char *stuff[3] = 
  1492.          {
  1493.           "Option 1",
  1494.           "Second Option",
  1495.           "Your Third Choice"
  1496.          };
  1497.  
  1498.         main()
  1499.          {
  1500.           int m;
  1501.           int x;
  1502.           pmcolor(RED_F,WHT_F,RED_F+WHT_B);
  1503.           m = pmopen(10,10,"[ Menu ]",3,stuff,1);
  1504.           x = pmrun(m);
  1505.           pmclose(m);
  1506.           printf("\nMenu Choice %d Chosen.\n");
  1507.          }
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.                                                                pmenu
  1523.         Summary:
  1524.  
  1525.         #include <csrmenu.h>     /* Contains MENU typedef */
  1526.  
  1527.         int pmenu(menu);
  1528.         MENU menu;               /* Pointer to Menu Structure */
  1529.  
  1530.         Created: 08/08/86        Last Updated: 08/20/86
  1531.  
  1532.         Author: Bob Pritchett         Source (C/A): C
  1533.  
  1534.         Located in: MENU.OBJ
  1535.  
  1536.         Requires: Nothing.
  1537.  
  1538.         Description:
  1539.  
  1540.         This function will display a pop up menu and allow for  selection 
  1541.         of an item with the arrow keys,  or the space and backspace keys. 
  1542.         The  differences between pmenu() and pop_menu() are mostly in the 
  1543.         calling method.   By using a data element of the MENU type as the 
  1544.         only argument, the number of parameters specifiable is increased, 
  1545.         allowing  for  better control of the menu,  while the  number  of 
  1546.         function arguments is reduced to one for cleaner coding.
  1547.  
  1548.         If the first character in an item name is a hyphen, the item will 
  1549.         be a horizontal line of the border color and type.  If the return 
  1550.         value  of  an  element  is  a  negative  one,  the  item  is  non 
  1551.         selectable.
  1552.  
  1553.         Note,  unlike  pop_menu(),  pmenu() will center the text of  each 
  1554.         entry to the width of the largest entry.  If you place a space on 
  1555.         each side of only the largest (widest) entry in a menu structure, 
  1556.         all menu options will have at least one space on each side.
  1557.  
  1558.         For information on specification of menus,  read the  description 
  1559.         of CSRMENU.H.
  1560.  
  1561.         Compiler Specifics:
  1562.  
  1563.         None.
  1564.  
  1565.         Return Value:
  1566.  
  1567.         The value of the menu item selected or a -1 for failure.
  1568.  
  1569.         See Also:
  1570.  
  1571.         pop_menu()
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.                                                                pmenu
  1589.  
  1590.  
  1591.  
  1592.  
  1593.         Example:
  1594.  
  1595.         #include <csrmenu.h>
  1596.         #include <color.h>
  1597.  
  1598.         MENU mnu;
  1599.  
  1600.         main() 
  1601.          {
  1602.           int x;
  1603.           strcpy(mnu->title,"Menu");
  1604.           mnu->type = 3;
  1605.           mnu->border = WHT_F+BLU_B;
  1606.           mnu->normal = RED_F+WHT_B;
  1607.           mnu->bar = WHT_F+RED_B;
  1608.           mnu->row = 6;
  1609.           mnu->col = 20;
  1610.           mnu->num = 4;
  1611.           strcpy(mnu->entry[0].text,"Help");
  1612.           mnu->entry[0].value = 1;
  1613.           strcpy(mnu->entry[1].text,"Exit");
  1614.           mnu->entry[1].value = 2;
  1615.           strcpy(mnu->entry[2].text,"-");
  1616.           mnu->entry[2].value = -1;
  1617.           strcpy(mnu->entry[3].text," Static ");
  1618.           mnu->entry[3].value = -1;
  1619.           x = pmenu(mnu);
  1620.           if ( x == -1 )
  1621.              exit(1);
  1622.           else if ( x == 1 )
  1623.              help();
  1624.           else
  1625.              exit(0);
  1626.           .
  1627.           .
  1628.           .
  1629.          }
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.                                                               pmfunc
  1655.         Summary:
  1656.  
  1657.         void pmfunc(func);
  1658.         int (*func)();           /* Function to be Called */
  1659.  
  1660.         Created: 07/03/87        Last Updated: 07/03/87
  1661.  
  1662.         Author: Bob Pritchett         Source (C/A): C
  1663.  
  1664.         Located in: CSRMENU.OBJ
  1665.  
  1666.         Requires: Nothing.
  1667.  
  1668.         Description:
  1669.  
  1670.         This function will set the name of a function to be called  while 
  1671.         pmrun()  is  waiting  for a keystroke.  This  function  must  run 
  1672.         continuously  until  a  keystroke is  hit.   (It  should  contain 
  1673.         something like a 'while ( ! kbhit() )' statement.)
  1674.  
  1675.         A  suggested  use  would be to update the time and  date  on  the 
  1676.         screen.
  1677.  
  1678.         Compiler Specifics:
  1679.  
  1680.         None.
  1681.  
  1682.         Return Value:
  1683.  
  1684.         Nothing.
  1685.  
  1686.         See Also:
  1687.  
  1688.         pmopen() pmrun()
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.                                                               pmfunc
  1721.  
  1722.  
  1723.  
  1724.  
  1725.         Example:
  1726.  
  1727.         int dtw;
  1728.  
  1729.         char *stuff[3] = 
  1730.          {
  1731.           "Option 1",
  1732.           "Second Option",
  1733.           "Your Third Choice"
  1734.          };
  1735.  
  1736.         main()
  1737.          {
  1738.           int m;
  1739.           int x;
  1740.           int update();
  1741.           dtw = wopen(1,61,4,78,1);
  1742.           pmfunc(update);
  1743.           m = pmopen(10,10,"[ Menu ]",3,stuff,1);
  1744.           x = pmrun(m);
  1745.           pmclose(m);
  1746.           printf("\nMenu Choice %d Chosen.\n");
  1747.          }
  1748.  
  1749.         update()
  1750.          {
  1751.           int d,mn,y;
  1752.           int h,m,s,hs;
  1753.           while ( ! kbhit() )
  1754.            {
  1755.             get_date(&d,&mn,&y);
  1756.             get_time(&h,&m,&s,&hs);
  1757.             whome(dtw);
  1758.             wprintf(dtw," Date: %02d/%02d/%d\n",mn,d,(y-1900));
  1759.             wprintf(dtw," Time: %02d:%02d:%02d",h,m,s);
  1760.            }
  1761.          }
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.                                                               pmopen
  1787.         Summary:
  1788.  
  1789.         int pmopen(r,c,title,argc,argv,type);
  1790.         int r;                   /* Upper Left Corner Row */
  1791.         int c;                   /* Upper Left Corner Column */
  1792.         char *title;             /* Title of Menu */
  1793.         int argc;                /* Option Count */
  1794.         char *argv[];            /* Options */
  1795.         int type;                /* Border Type of Menu */
  1796.  
  1797.         Created: 07/02/87        Last Updated: 07/03/87
  1798.  
  1799.         Author: Bob Pritchett         Source (C/A): C
  1800.  
  1801.         Located in: CSRMENU.OBJ
  1802.  
  1803.         Requires: Nothing.
  1804.  
  1805.         Description:
  1806.  
  1807.         This function opens a menu and sets up the internal data  without 
  1808.         allowing  the  user to use the menu.  The  options  are  centered 
  1809.         according  to the length of the longest one plus two.  (Left  and 
  1810.         right justified menus can be created by left or right  justifying 
  1811.         the options before calling pmopen().)
  1812.  
  1813.         Options  preceded by a '#' are static, meaning that they are  not 
  1814.         selectable.  Those preceded by a '-' will be replaced with a line 
  1815.         on the display.
  1816.  
  1817.         The integer value returned is a pointer to the menu for use  with 
  1818.         pmrun()  or pmclose().  There are eight available  pointers,  and 
  1819.         each menu can have as many as fifteen options.
  1820.  
  1821.         Compiler Specifics:
  1822.  
  1823.         None.
  1824.  
  1825.         Return Value:
  1826.  
  1827.         The menu pointer.
  1828.  
  1829.         See Also:
  1830.  
  1831.         pmclose() pmrun() pmenu() pop_menu()
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.                                                               pmopen
  1853.  
  1854.  
  1855.  
  1856.  
  1857.         Example:
  1858.  
  1859.         int dtw;
  1860.  
  1861.         char *stuff[5] = 
  1862.          {
  1863.           "Option 1",
  1864.           "-This is a line."
  1865.           "Second Option",
  1866.           "#Unselectable",
  1867.           "Your Third Choice"
  1868.          };
  1869.  
  1870.         main()
  1871.          {
  1872.           int m;
  1873.           int x;
  1874.           int update();
  1875.           dtw = wopen(1,61,4,78,1);
  1876.           pmfunc(update);
  1877.           m = pmopen(10,10,"[ Menu ]",5,stuff,1);
  1878.           x = pmrun(m);
  1879.           pmclose(m);
  1880.           printf("\nMenu Choice %d Chosen.\n");
  1881.          }
  1882.  
  1883.         update()
  1884.          {
  1885.           int d,mn,y;
  1886.           int h,m,s,hs;
  1887.           while ( ! kbhit() )
  1888.            {
  1889.             get_date(&d,&mn,&y);
  1890.             get_time(&h,&m,&s,&hs);
  1891.             whome(dtw);
  1892.             wprintf(dtw," Date: %02d/%02d/%d\n",mn,d,(y-1900));
  1893.             wprintf(dtw," Time: %02d:%02d:%02d",h,m,s);
  1894.            }
  1895.          }
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.                                                                pmrun
  1919.         Summary:
  1920.  
  1921.         void pmrun(mnu);
  1922.         int mnu;                 /* Menu to Run */
  1923.  
  1924.         Created: 07/03/87        Last Updated: 07/03/87
  1925.  
  1926.         Author: Bob Pritchett         Source (C/A): C
  1927.  
  1928.         Located in: CSRMENU.OBJ
  1929.  
  1930.         Requires: Nothing.
  1931.  
  1932.         Description:
  1933.  
  1934.         This function will 'run' the specified menu, assuming that is has 
  1935.         already been opened with the pmopen() function.
  1936.  
  1937.         If a function has been specified by the pmfunc() function it will 
  1938.         be  run until a key is hit, at which time pmrun()  processes  it.  
  1939.         Up and down arrows scroll the highlight bar through the menu,  as 
  1940.         do space and backspace.  Hitting the enter key causes pmrun()  to 
  1941.         return  the  number  of the  option  currently  highlighted,  and 
  1942.         entering  the first letter of an option will cause it  to  return 
  1943.         the  number of the FIRST option beginning with that letter.   The 
  1944.         ESCape key causes pmrun() to return a -1.
  1945.  
  1946.         Note  that pmrun() always highlights the first menu  option,  and 
  1947.         does not close the menu before returning the selected value.
  1948.  
  1949.         Compiler Specifics:
  1950.  
  1951.         None.
  1952.  
  1953.         Return Value:
  1954.  
  1955.         The  number  of  the option selected, or -1 in the  case  of  the 
  1956.         escape key.
  1957.  
  1958.         See Also:
  1959.  
  1960.         pmclose() pmopen() pmenu() pop_menu()
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.                                                                pmrun
  1985.  
  1986.  
  1987.  
  1988.  
  1989.         Example:
  1990.  
  1991.         char *stuff[5] = 
  1992.          {
  1993.           "Option 1",
  1994.           "-This is a line."
  1995.           "Second Option",
  1996.           "#Unselectable",
  1997.           "Your Third Choice"
  1998.          };
  1999.  
  2000.         main()
  2001.          {
  2002.           int m;
  2003.           int x;
  2004.           m = pmopen(10,10,"[ Menu ]",5,stuff,1);
  2005.           while ( 1 )
  2006.            {
  2007.             x = pmrun(m);
  2008.             if ( x == -1 )
  2009.                break;
  2010.             switch(x)
  2011.              {
  2012.               case 0:
  2013.                 opt_one();
  2014.                 break;
  2015.               case 2:
  2016.                 opt_two();
  2017.                 break;
  2018.               case 4:
  2019.                 opt_three();
  2020.                 break;
  2021.               default:
  2022.                 break;
  2023.              }  
  2024.            }
  2025.           pmclose(m);
  2026.           printf("\nMenu Choice %d Chosen.\n");
  2027.          }
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.                                                                putat
  2051.         Summary:
  2052.  
  2053.         int putat(x,y,string);
  2054.         int x;                   /* Row to Put At */
  2055.         int y;                   /* Col to Put At */
  2056.         char *string;            /* String to Put */
  2057.  
  2058.         Created: 12/28/85        Last Updated: 07/09/87
  2059.  
  2060.         Author: Bob Pritchett         Source (C/A): C
  2061.  
  2062.         Located in: PUTAT.OBJ
  2063.  
  2064.         Requires: ccputs() putchci()
  2065.  
  2066.         Description:
  2067.  
  2068.         This  function  places the specified string at x,y on the  global 
  2069.         screen using the global color set by color().
  2070.  
  2071.         Compiler Specifics:
  2072.  
  2073.         None.
  2074.  
  2075.         Return Value:
  2076.  
  2077.         Nothing.
  2078.  
  2079.         See Also:
  2080.  
  2081.         putatf() wputat() wputatf()
  2082.  
  2083.         Example:
  2084.  
  2085.         putat(10,25,"+ The plus is at 10,25.");
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.                                                               putatf
  2117.         Summary:
  2118.  
  2119.         int putatf(x,y,string,args...);
  2120.         int x;                   /* Row to Put At */
  2121.         int y;                   /* Col to Put At */
  2122.         char *string;            /* Formatted String to Put */
  2123.         args...                  /* Formatting Arguments */
  2124.  
  2125.         Created: 05/01/86        Last Updated: 07/09/87
  2126.  
  2127.         Author: Bob Pritchett         Source (C/A): C
  2128.  
  2129.         Located in: PUTATF.OBJ
  2130.  
  2131.         Requires: ccputs() putchci()
  2132.  
  2133.         Description:
  2134.  
  2135.         This  performs the same function as putat() with the addition  of 
  2136.         up to 15 formatting arguments in the same format as printf().
  2137.  
  2138.         Compiler Specifics:
  2139.  
  2140.         None.
  2141.  
  2142.         Return Value:
  2143.  
  2144.         Nothing.
  2145.  
  2146.         See Also:
  2147.  
  2148.         putat() wputat() wputatf()
  2149.  
  2150.         Example:
  2151.  
  2152.         putatf(10,25,"+ The plus %s at %d,%d.","is",10,25);
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.                                                       restore_cursor
  2183.         Summary:
  2184.  
  2185.         int restore_cursor(x);
  2186.         int x;                   /* Cursor to Restore */
  2187.  
  2188.         Created: 02/22/86        Last Updated: 07/02/87
  2189.  
  2190.         Author: Bob Pritchett         Source (C/A): C
  2191.  
  2192.         Located in: CURSOR.OBJ
  2193.  
  2194.         Requires: int86()
  2195.  
  2196.         Description:
  2197.  
  2198.         This  function restores the cursor to the location stored by  the 
  2199.         pointer  returned  by save_cursor().  Note:   This  function  has 
  2200.         changed since previous versions.
  2201.  
  2202.         Compiler Specifics:
  2203.  
  2204.         Problems associated with int86() only.
  2205.  
  2206.         Return Value:
  2207.  
  2208.         Nothing.
  2209.  
  2210.         See Also:
  2211.  
  2212.         save_cursor() restore_screen()
  2213.  
  2214.         Example:
  2215.  
  2216.         int x;
  2217.         int y;
  2218.  
  2219.         gotoxy(8,8);
  2220.         x = save_cursor();
  2221.         gotoxy(10,10);
  2222.         y = save_cursor();
  2223.  
  2224.         restore_cursor(x);      /* Return to 8,8 */
  2225.         restore_cursor(y);      /* Return to 10,10 */
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.                                                          save_cursor
  2249.         Summary:
  2250.  
  2251.         int save_cursor();
  2252.  
  2253.         Created: 02/22/86        Last Updated: 07/02/87
  2254.  
  2255.         Author: Bob Pritchett         Source (C/A): C
  2256.  
  2257.         Located in: CURSOR.OBJ
  2258.  
  2259.         Requires: int86()
  2260.  
  2261.         Description:
  2262.  
  2263.         This  function  saves the current cursor position and  returns  a 
  2264.         pointer  to  that  saved  value.  This  must  be  used  with  the 
  2265.         restore_cursor() function to put the cursor back.  By using  this 
  2266.         method  of  pointers  functions can use  the  cursor  saving  and 
  2267.         restoring functions without fear of destroying another function's 
  2268.         data.
  2269.  
  2270.         Compiler Specifics:
  2271.  
  2272.         int86().
  2273.  
  2274.         Return Value:
  2275.  
  2276.         Nothing.
  2277.  
  2278.         See Also:
  2279.  
  2280.         restore_cursor()
  2281.  
  2282.         Example:
  2283.  
  2284.         int x;
  2285.  
  2286.         x = save_cursor();
  2287.  
  2288.         printf("This is a string of text...");
  2289.  
  2290.         restore_cursor(x);        /* To the beginning of the line... */ 
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.                                                              setbeep
  2315.         Summary:
  2316.  
  2317.         void setbeep(tone,length);
  2318.         int tone;                /* Tone for Beep */
  2319.         int length;              /* Length in Milliseconds */
  2320.  
  2321.         Created: 07/02/87        Last Updated: 07/02/87
  2322.  
  2323.         Author: Bob Pritchett         Source (C/A): C
  2324.  
  2325.         Located in: CSRBEEP.OBJ
  2326.  
  2327.         Requires: Nothing.
  2328.  
  2329.         Description:
  2330.  
  2331.         This function sets the tone and duration of the beep produced  by 
  2332.         beep().  The default values are 450 and 125.
  2333.  
  2334.         Compiler Specifics:
  2335.  
  2336.         None.
  2337.  
  2338.         Return Value:
  2339.  
  2340.         Nothing.
  2341.  
  2342.         See Also:
  2343.  
  2344.         beep() setbeep()
  2345.  
  2346.         Example:
  2347.  
  2348.         setbeep(800,300);                     /* Long and High */
  2349.  
  2350.         beep();                               /* Output Beep */
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.                                                               sndout
  2381.         Summary:
  2382.  
  2383.         void sndout(void);
  2384.  
  2385.         Created: 07/02/87        Last Updated: 07/05/87
  2386.  
  2387.         Author: Bob Pritchett         Source (C/A): C
  2388.  
  2389.         Located in: CSRSOUND.OBJ
  2390.  
  2391.         Requires: Nothing.
  2392.  
  2393.         Description:
  2394.  
  2395.         This  is  the  function  used internally  to  process  the  timer 
  2396.         interrupt for background sound when it is trapped by sndsetint().  
  2397.         It  increments a timer tick count and decides whether or  not  to 
  2398.         start or stop a note as it is playing.
  2399.  
  2400.         There is no need to use it apart from its related routines.
  2401.  
  2402.         Compiler Specifics:
  2403.  
  2404.         None.
  2405.  
  2406.         Return Value:
  2407.  
  2408.         Nothing.
  2409.  
  2410.         See Also:
  2411.  
  2412.         sound() sndsetint() sndrstint()
  2413.  
  2414.         Example:
  2415.  
  2416.         /**** Internal Use Only ****/
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.                                                            sndsetint
  2447.         Summary:
  2448.  
  2449.         void sndsetint(void);
  2450.  
  2451.         Created: 07/02/87        Last Updated: 07/02/87
  2452.  
  2453.         Author: Bob Pritchett         Source (C/A): A
  2454.  
  2455.         Located in: CSRSHND.OBJ
  2456.  
  2457.         Requires: Nothing.
  2458.  
  2459.         Description:
  2460.  
  2461.         This function stores the current timer interrupt handler and sets 
  2462.         it  to an internal routine that calls sndout() and then  the  old 
  2463.         handler.   No initialization of the background sound routines  is 
  2464.         done.
  2465.  
  2466.         Compiler Specifics:
  2467.  
  2468.         None.
  2469.  
  2470.         Return Value:
  2471.  
  2472.         Nothing.
  2473.  
  2474.         See Also:
  2475.  
  2476.         sound() sndout() sndrstint()
  2477.  
  2478.         Example:
  2479.  
  2480.         /**** Internal Use Only ****/
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.                                                            sndrstint
  2513.         Summary:
  2514.  
  2515.         void sndrstint(void);
  2516.  
  2517.         Created: 07/02/87        Last Updated: 07/02/87
  2518.  
  2519.         Author: Bob Pritchett         Source (C/A): A
  2520.  
  2521.         Located in: CSRSHND.OBJ
  2522.  
  2523.         Requires: Nothing.
  2524.  
  2525.         Description:
  2526.  
  2527.         This function removes from the chain of timer interrupt  handlers 
  2528.         CSR's  background  sound  routines  and  replaces  the   previous 
  2529.         handler.   This function MUST be called before a  program  exits.  
  2530.         (The  sound_done()  function calls this function in  addition  to 
  2531.         cleaning  up  internal  variables.   One of  these  two  must  be 
  2532.         called.   It  is  recommended that  a  control-break  handler  is 
  2533.         installed to either call this function or one that will.)
  2534.  
  2535.         Compiler Specifics:
  2536.  
  2537.         None.
  2538.  
  2539.         Return Value:
  2540.  
  2541.         Nothing.
  2542.  
  2543.         See Also:
  2544.  
  2545.         sound() sndout() sndsetint() sound_done()
  2546.  
  2547.         Example:
  2548.  
  2549.         static int cbflag = 0;
  2550.  
  2551.         cbcapt(&cbflag);                /* Set Flag for Ctrl-Break */
  2552.  
  2553.         sound_init();                   /* Initialize Sound */
  2554.  
  2555.         while ( 1 )
  2556.          {
  2557.           /* Run Program Code - Break When Done */
  2558.           if ( cbflag )                 /* If Control-Break Occured */
  2559.            {
  2560.             sndrstint();                /* Restore Timer Handler */
  2561.             exit(1);                    /* Exit Program */
  2562.            }
  2563.          }
  2564.         sndrstint();                    /* Restore After Execution */
  2565.         exit(0);                        /* Program Exits Normally */
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.                                                                sound
  2579.         Summary:
  2580.  
  2581.         #include <csrsound.h>
  2582.  
  2583.         void sound(tone,duration);
  2584.         long tone;               /* Frequency in MegaHertz x 100 */
  2585.         long duration;           /* Length in Milliseconds */
  2586.  
  2587.         Created: 05/12/86        Last Updated: 07/05/87
  2588.  
  2589.         Author: Bob Pritchett         Source (C/A): C
  2590.  
  2591.         Located in: CSRSOUND.OBJ
  2592.  
  2593.         Requires: Nothing.
  2594.  
  2595.         Description:
  2596.  
  2597.         This  function  will put the specified note into the  buffer  and 
  2598.         return,  when  in background mode, or play the note  and  return.  
  2599.         (See the 'Sound' description of related routines in the beginning 
  2600.         of  this documentation.)  If sound is in background mode and  the 
  2601.         buffer  is full it will wait until there is room  before  placing 
  2602.         the note in the buffer.
  2603.  
  2604.         The tone variable must hold the frequency to be output multiplied 
  2605.         by  100.   (Previous  versions of sound worked  with  the  actual 
  2606.         frequency.)    The  duration  is  the  length  of  the  note   in 
  2607.         milliseconds, and should be reasonably accurate on all processors 
  2608.         and in both modes.
  2609.  
  2610.         Compiler Specifics:
  2611.  
  2612.         None.
  2613.  
  2614.         Return Value:
  2615.  
  2616.         Nothing.
  2617.  
  2618.         See Also:
  2619.  
  2620.         sound_init() play() beep() setbeep()
  2621.  
  2622.         Example:
  2623.  
  2624.         #include <csrsound.h>
  2625.  
  2626.         sound(C,5000L);
  2627.         sound(D,2500L);
  2628.         sound(E,1250L);
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.                                                           sound_done
  2645.         Summary:
  2646.  
  2647.         void sound_done(void);
  2648.  
  2649.         Created: 07/02/87        Last Updated: 07/05/87
  2650.  
  2651.         Author: Bob Pritchett         Source (C/A): C
  2652.  
  2653.         Located in: CSRSOUND.OBJ
  2654.  
  2655.         Requires: sndrstint() spkr_off()
  2656.  
  2657.         Description:
  2658.  
  2659.         This  function calls sndrstint() to restore the  timer  interrupt 
  2660.         (which  MUST  be done before any program using  background  sound 
  2661.         exits) and turns off the speaker in case it was left on.
  2662.  
  2663.         Compiler Specifics:
  2664.  
  2665.         None.
  2666.  
  2667.         Return Value:
  2668.  
  2669.         Nothing.
  2670.  
  2671.         See Also:
  2672.  
  2673.         sound() sound_init() sndsetint() sndrstint() play()
  2674.  
  2675.         Example:
  2676.  
  2677.         sound_init();
  2678.         /* Play something.... */
  2679.         sound_done();
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.                                                           sound_init
  2711.         Summary:
  2712.  
  2713.         void sound_init(void);
  2714.  
  2715.         Created: 07/02/87        Last Updated: 07/05/87
  2716.  
  2717.         Author: Bob Pritchett         Source (C/A): C
  2718.  
  2719.         Located in: CSRSOUND.OBJ
  2720.  
  2721.         Requires: sndsetint()
  2722.  
  2723.         Description:
  2724.  
  2725.         This  function calls sndsetint() to trap the timer interrupt  and 
  2726.         sets up the sound routine to play notes in the background.   When 
  2727.         this  function  is called all subsequent calls  to  sound()  will 
  2728.         cause the notes to be played in background.
  2729.  
  2730.         Compiler Specifics:
  2731.  
  2732.         None.
  2733.  
  2734.         Return Value:
  2735.  
  2736.         Nothing.
  2737.  
  2738.         See Also:
  2739.  
  2740.         sound() sound_done() sndsetint() sndrstint() play()
  2741.  
  2742.         Example:
  2743.  
  2744.         sound_init();
  2745.         /* Play something.... */
  2746.         sound_done();
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.                                                           sound_left
  2777.         Summary:
  2778.  
  2779.         int sound_left(void);
  2780.  
  2781.         Created: 07/02/87        Last Updated: 07/05/87
  2782.  
  2783.         Author: Bob Pritchett         Source (C/A): C
  2784.  
  2785.         Located in: CSRSOUND.OBJ
  2786.  
  2787.         Requires: Nothing.
  2788.  
  2789.         Description:
  2790.  
  2791.         This  function  returns  the number of  notes  remaining  in  the 
  2792.         background sound buffer.
  2793.  
  2794.         Compiler Specifics:
  2795.  
  2796.         None.
  2797.  
  2798.         Return Value:
  2799.  
  2800.         The number of notes in the background sound buffer.
  2801.  
  2802.         See Also:
  2803.  
  2804.         sound() sound_init() sound_quiet() play() sound_done()
  2805.  
  2806.         Example:
  2807.  
  2808.         sound_init();
  2809.         /* Play something.... */
  2810.         wait_hs(500);                   /* Wait 5 Seconds */
  2811.         if ( sound_left() )             /* If Sound Remains */
  2812.            sound_quiet();               /*   Kill It */
  2813.         /* Go on with program.... */
  2814.         sound_done();
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.                                                          sound_quiet
  2843.         Summary:
  2844.  
  2845.         void sound_quiet(void);
  2846.  
  2847.         Created: 07/02/87        Last Updated: 07/05/87
  2848.  
  2849.         Author: Bob Pritchett         Source (C/A): C
  2850.  
  2851.         Located in: CSRSOUND.OBJ
  2852.  
  2853.         Requires: spkr_off()
  2854.  
  2855.         Description:
  2856.  
  2857.         This  function aborts all of the sound in the buffer, resets  the 
  2858.         internal values, and turns off the speaker, but leaves the  sound 
  2859.         in background mode.
  2860.  
  2861.         Compiler Specifics:
  2862.  
  2863.         None.
  2864.  
  2865.         Return Value:
  2866.  
  2867.         Nothing.
  2868.  
  2869.         See Also:
  2870.  
  2871.         sound() sound_init() sound_left() play() sound_done()
  2872.  
  2873.         Example:
  2874.  
  2875.         sound_init();
  2876.         /* Play something.... */
  2877.         wait_hs(500);                   /* Wait 5 Seconds */
  2878.         sound_quiet();                  /* Kill Whatever is Left */
  2879.         /* Go on with program.... */
  2880.         sound_done();
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.                                                            spkr_freq
  2909.         Summary:
  2910.  
  2911.         void spkr_freq(tone);
  2912.         long tone;               /* Frequency x 100 to Set Speaker To */
  2913.  
  2914.         Created: 07/02/87        Last Updated: 07/05/87
  2915.  
  2916.         Author: Bob Pritchett         Source (C/A): C
  2917.  
  2918.         Located in: CSRSOUND.OBJ
  2919.  
  2920.         Requires: Nothing.
  2921.  
  2922.         Description:
  2923.  
  2924.         This  function sets up the speaker for a frequency but  does  not 
  2925.         play the frequency.  The spkr_on() function initiates the  actual 
  2926.         sound.
  2927.  
  2928.         Compiler Specifics:
  2929.  
  2930.         None.
  2931.  
  2932.         Return Value:
  2933.  
  2934.         Nothing.
  2935.  
  2936.         See Also:
  2937.  
  2938.         sound() sound_init() sndout() spkr_on() spkr_off()
  2939.  
  2940.         Example:
  2941.  
  2942.         /***** Used Internally by sndout() *****/
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.                                                             spkr_off
  2975.         Summary:
  2976.  
  2977.         void spkr_off(void);
  2978.  
  2979.         Created: 07/02/87        Last Updated: 07/05/87
  2980.  
  2981.         Author: Bob Pritchett         Source (C/A): C
  2982.  
  2983.         Located in: CSRSOUND.OBJ
  2984.  
  2985.         Requires: Nothing.
  2986.  
  2987.         Description:
  2988.  
  2989.         This  function  simply turns off the speaker, cutting  short  any 
  2990.         sound currently being made.
  2991.  
  2992.         Compiler Specifics:
  2993.  
  2994.         None.
  2995.  
  2996.         Return Value:
  2997.  
  2998.         Nothing.
  2999.  
  3000.         See Also:
  3001.  
  3002.         sound() sound_init() sndout() spkr_on() spkr_freq()
  3003.  
  3004.         Example:
  3005.  
  3006.         /***** Used Internally by sndout() *****/
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.                                                              spkr_on
  3041.         Summary:
  3042.  
  3043.         void spkr_on(void);
  3044.  
  3045.         Created: 07/02/87        Last Updated: 07/05/87
  3046.  
  3047.         Author: Bob Pritchett         Source (C/A): C
  3048.  
  3049.         Located in: CSRSOUND.OBJ
  3050.  
  3051.         Requires: Nothing.
  3052.  
  3053.         Description:
  3054.  
  3055.         This  function turns on the speaker, causing it to play  whatever 
  3056.         frequency  it  has loaded.  (See spkr_freq().)   The  sound  will 
  3057.         continue until spkr_off() is called.
  3058.  
  3059.         Compiler Specifics:
  3060.  
  3061.         None.
  3062.  
  3063.         Return Value:
  3064.  
  3065.         Nothing.
  3066.  
  3067.         See Also:
  3068.  
  3069.         sound() sound_init() sndout() spkr_off() spkr_freq()
  3070.  
  3071.         Example:
  3072.  
  3073.         /***** Used Internally by sndout() *****/
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085.  
  3086.  
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.                                                              wait_hs
  3107.         Summary:
  3108.  
  3109.         int wait_hs(time);
  3110.         int time;                /* Hundredths of Seconds to Wait */
  3111.  
  3112.         Created: 06/18/87        Last Updated: 07/02/87
  3113.  
  3114.         Author: Bob Pritchett         Source (C/A): C
  3115.  
  3116.         Located in: WAIT_HS.OBJ
  3117.  
  3118.         Requires: get_time()
  3119.  
  3120.         Description:
  3121.  
  3122.         This  function simply sits and waits for as many hundredths of  a 
  3123.         second as specified.  It is accurate to within the time it  takes 
  3124.         get_time() to run.  (If a key is hit during the delay, the  delay 
  3125.         is aborted and the keystroke returned.)
  3126.  
  3127.         Compiler Specifics:
  3128.  
  3129.         None.
  3130.  
  3131.         Return Value:
  3132.  
  3133.         Any key hit during the delay, or -1 if full delay endured.
  3134.  
  3135.         See Also:
  3136.  
  3137.  
  3138.  
  3139.         Example:
  3140.  
  3141.         if ( ( c = wait_hs(200) ) == -1 )        /* Wait 2 Seconds */
  3142.          {
  3143.           printf("Please Enter a Key!\n");
  3144.           c = getch();
  3145.          }
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.                                                            wfbreakon
  3173.         Summary:
  3174.  
  3175.         #include <skey.h>        /* Needed Only for Key Descriptions */
  3176.  
  3177.         int wfbreakon(x);
  3178.         int x;                   /* Special Key to Break On */
  3179.  
  3180.         Created: 06/29/87        Last Updated: 06/29/87
  3181.  
  3182.         Author: Bob Pritchett         Source (C/A): C
  3183.  
  3184.         Located in: WFINPUT.OBJ
  3185.  
  3186.         Requires: Nothing.
  3187.  
  3188.         Description:
  3189.  
  3190.         This  function  allows the programmer to set which  special  keys 
  3191.         will cause the wfinptstred() to exit.  Each call to this function 
  3192.         adds the argument given to the list of break keys.  (The #include 
  3193.         file  SKEY.H  contains easy definitions for  the  special  keys.)  
  3194.         When given zero as an argument the list is cleared.
  3195.  
  3196.         The default break keys are HOME, END, PGUP, PGDN, UARROW, DARROW, 
  3197.         ALTE, ALTX, and ALTQ.
  3198.  
  3199.         Compiler Specifics:
  3200.  
  3201.         None.
  3202.  
  3203.         Return Value:
  3204.  
  3205.         Nothing is returned.
  3206.  
  3207.         See Also:
  3208.  
  3209.         fbreakon() wfinptstred()
  3210.  
  3211.         Example:
  3212.  
  3213.         #include <skey.h>
  3214.  
  3215.         char temp[30];
  3216.  
  3217.         wfbreakon(0);                   /* Clear List */
  3218.         wfbreakon(ALTH);                /* Alt-H Only */
  3219.  
  3220.         if ( wfinptstred(10,10,25,temp,"Default") == ALTH )
  3221.            help();
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.                                                          wfinptstred
  3239.         Summary:
  3240.  
  3241.         int wfinptstred(w,rw,cl,mx,str,def);
  3242.         int w;                   /* Window to Use */
  3243.         int rw;                  /* Row of Field */
  3244.         int cl;                  /* Column of Field */
  3245.         int mx;                  /* Length of Field */
  3246.         char *str;               /* Where to Place Input */
  3247.         char *def;               /* Default String */
  3248.  
  3249.         Created: 10/19/86        Last Updated: 06/29/87
  3250.  
  3251.         Author: Bob Pritchett         Source (C/A): C
  3252.  
  3253.         Located in: WFINPUT.OBJ
  3254.  
  3255.         Requires: wgotoxy() cfield()
  3256.  
  3257.         Description:
  3258.  
  3259.         This  function  behaves as does finptstred() with  the  exception 
  3260.         that  it  works within a window.   Due to the complexity of  this 
  3261.         routine  and  the  fact  that it  is  functionally  identical  to 
  3262.         finptstred() the complete description is not repeated here.
  3263.  
  3264.         Compiler Specifics:
  3265.  
  3266.         None.
  3267.  
  3268.         Return Value:
  3269.  
  3270.         A  one is returned unless input was terminated by a special  key, 
  3271.         in which case its value will be returned.  (Special keys return a 
  3272.         null followed by an integer.  The integer is returned here.)
  3273.  
  3274.         See Also:
  3275.  
  3276.         inptstr() wfinptint() wfinptstred() wffill() wfinptstr() 
  3277.         finptstred() wfbreakon()
  3278.  
  3279.         Example:
  3280.  
  3281.         char temp[80];
  3282.         int x;
  3283.         int w;
  3284.  
  3285.         w = wopen(4,4,20,70,5);
  3286.  
  3287.         x = wfinptstred(w,10,10,25,temp,"C Spot Run");
  3288.  
  3289.         if ( x != 1 )                 /* Special Value */
  3290.            process(x);                /* Process Key */
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.                                                              wprintc
  3305.         Summary:
  3306.  
  3307.         int wprintc(win,str,clr);
  3308.         int win;                 /* Window to Use */
  3309.         char *str;               /* String to Print */
  3310.         int clr;                 /* Color to Print With */
  3311.  
  3312.         Created: 07/09/87        Last Updated: 07/09/87
  3313.  
  3314.         Author: Bob Pritchett         Source (C/A): C
  3315.  
  3316.         Located in: WPRINTC.OBJ
  3317.  
  3318.         Requires: wscolor() wprint()
  3319.  
  3320.         Description:
  3321.  
  3322.         This  function  sets  the specified window's  inside  and  border 
  3323.         colors to clr and prints the string.  The colors are not reset.
  3324.  
  3325.         Compiler Specifics:
  3326.  
  3327.         None.
  3328.  
  3329.         Return Value:
  3330.  
  3331.         Nothing.
  3332.  
  3333.         See Also:
  3334.  
  3335.         wprintf() wprint() wscolor()
  3336.  
  3337.         Example:
  3338.  
  3339.         wprintc(w3,"This line is output in red on white.\n",RED_F+WHT_B);
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.                           C Spot Run - Documentation
  3368.  
  3369.  
  3370.                         Appendix A - Updating the Library
  3371.  
  3372.              The  C Spot Run routine library is constantly being added to 
  3373.         as  we receive contributions and write more  routines  ourselves.  
  3374.         In  the interest of saving time and space,  library updates  will 
  3375.         come in one of two forms.
  3376.              First,   small  collections  of  new  routines,   or  single 
  3377.         routines,  will be placed in archives along with a single page of 
  3378.         documentation  and  distributed via BBSs.  Registered users  will 
  3379.         receive information about new updates or a copy of those updates.  
  3380.         When  you  receive an update archive you simply place  the  files 
  3381.         into  your  library  or  linking  directory  and  print  out  the 
  3382.         documentation page,  which is then inserted in alphabetical order 
  3383.         into  the library description section of this manual.   (This  is 
  3384.         why  those pages are not numbered and we recommend  storing  your 
  3385.         manual in a three ring binder.)  
  3386.              Second,   major  updates  to  the  entire  library  will  be 
  3387.         distributed  in  archives  containing all  the  routines,  and  a 
  3388.         totally new version of the complete manual.   These updates  will 
  3389.         be on new version numbers.
  3390.              To  keep  on top of changes to the library it  is  suggested 
  3391.         that  you  read  issues of the C Spot Run  Newsletter  as  it  is 
  3392.         released,  and  make an occasional call to the support BBS  where 
  3393.         the  latest  version  of the library and  newsletter  are  always 
  3394.         available.
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.                           C Spot Run - Documentation
  3434.  
  3435.  
  3436.                          Appendix B - Contacting Authors
  3437.  
  3438.              Each  description  page mentions the name of the  author  of 
  3439.         that routine, utility, or aid.  If for some reason you would like 
  3440.         to contact that author you may check the following directory  for 
  3441.         addresses  and  possibly  phone  numbers.  (NOTE:   All  of   the 
  3442.         following   authors  voluntarily  placed  their   addresses   and 
  3443.         sometimes  their  phone  numbers in this  directory.   They  have 
  3444.         indicated a willingness to answer questions by doing this, but we 
  3445.         ask you to be considerate with your calling hours.) 
  3446.  
  3447.  
  3448.              Mongelluzzo, Philip A.   (203) 574-2326 - Voice
  3449.                273 Windy Drive        (203) 271-1579 - Data (300/1200B)
  3450.                Waterbury, CT  06705
  3451.  
  3452.              Pritchett, Bob           (609) 424-2595 - Voice
  3453.                23 Pawtucket Drive     (609) 354-9259 - Data (300-2400B)
  3454.                Cherry Hill, NJ  08003       FidoNet: 107/414
  3455.  
  3456.              Roukas, George
  3457.                C/O Pinelands BBS      (609) 354-9259 - Data (300-2400B)
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.                           C Spot Run - Documentation
  3500.  
  3501.  
  3502.                   Appendix C - Submitting Routines or Utilities
  3503.  
  3504.              All submissions to the routine library or utility collection 
  3505.         should  be  made using the Routine/Utility Submission  Form,  and 
  3506.         should be sent to the address on that form.   Please do not  make 
  3507.         additions to the library or utility collection on your own,  this 
  3508.         creates a problem and complicates the distribution.   
  3509.              In   addition  to  the  following  form  please  enclose   a 
  3510.         description  of the routine or utility,  preferably on an IBM  PC 
  3511.         disk  (360K  or  1.2Meg).   Please make this description  in  the 
  3512.         appropriate  format as specified in sections 4.1 and 4.2 of  this 
  3513.         manual.
  3514.  
  3515.  
  3516.  
  3517.  
  3518.  
  3519.  
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539.  
  3540.  
  3541.  
  3542.  
  3543.  
  3544.  
  3545.  
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.                           C Spot Run - Documentation
  3566.  
  3567.  
  3568.                   Appendix D - History of Versions and Changes
  3569.  
  3570.              07/12/87  -  Version  2.1  released  with  bug  fixes,   new 
  3571.         routines,  Turbo C support, and a new version of the  newsletter.  
  3572.         Available  complete (CSR21.ARC) and as an update to Version  2.0.  
  3573.         (CSRUPDT2.ARC)
  3574.  
  3575.              06/02/87  - Preliminary  Version  2.0 support  for  Turbo  C 
  3576.         released.
  3577.  
  3578.              01/15/87  - Version  2.0A replaces 2.0,  which  was  missing 
  3579.         CheckC and FLine programs.
  3580.  
  3581.              01/10/87  - Version  2.0  of the library released  with  new 
  3582.         features and a new newsletter.
  3583.  
  3584.              10/13/86  - Limited release of version 1.1 of the library to 
  3585.         some  registered users.   Most bugs fixed,  manual  updated,  new 
  3586.         routines.
  3587.  
  3588.              06/27/86 - First issue of the newsletter released.
  3589.  
  3590.              05/05/86 - Version 1.0 of the library released.
  3591.  
  3592.              03/03/86 - Coding of Windowing routines begun.
  3593.  
  3594.  
  3595.  
  3596.  
  3597.  
  3598.  
  3599.  
  3600.  
  3601.  
  3602.  
  3603.  
  3604.  
  3605.  
  3606.  
  3607.  
  3608.  
  3609.  
  3610.  
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.                           C Spot Run - Documentation
  3632.  
  3633.  
  3634.                         Appendix F - Window Border Styles
  3635.  
  3636.  
  3637.                                      Type 0
  3638.  
  3639.                                Borderless window.
  3640.  
  3641.                           Type 1                Type 2
  3642.  
  3643.                         +--------+            +========+  
  3644.                         |        |            |        |  
  3645.                         +--------+            :========:  
  3646.                         |        |            |        |  
  3647.                         +--------+            +========+  
  3648.  
  3649.  
  3650.                           Type 3                Type 4
  3651.  
  3652.                         ++======++            ++------++  
  3653.                         ||      ||            ||      ||  
  3654.                         |:======:|            |+------+|  
  3655.                         ||      ||            ||      ||  
  3656.                         ++======++            ++------++  
  3657.  
  3658.  
  3659.                                      Type 5
  3660.  
  3661.                     The actual plus and minus characters will
  3662.                   be used, resulting in a display identical to
  3663.                 the non graphic representation of type number 1.
  3664.  
  3665.  
  3666.                                Any Other Character
  3667.  
  3668.                    If any other character is used as the type
  3669.               argument, that character will be used for the border.
  3670.  
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.                           C Spot Run - Documentation
  3698.  
  3699.  
  3700.                               Quick Reference Chart
  3701.  
  3702.         Control-Break Routines
  3703.         ----------------------------------------
  3704.         cbcapt()       cbrest()
  3705.  
  3706.         Cursor Control Routines
  3707.         ----------------------------------------
  3708.         current_page() cursor_off()   cursor_on()    cursor_read()
  3709.         cursor_size()  gotoxy()       restore_cursor()
  3710.         save_cursor()
  3711.  
  3712.         Date Manipulation Routines
  3713.         ----------------------------------------
  3714.         chk_date()     date_sn()      day_of_year()  dt_diff()
  3715.         isleap()       month_day()    sn_date()      valid_date()
  3716.  
  3717.         Disk Drive Routines
  3718.         ----------------------------------------
  3719.         dirwin()       ffirst()       fnext()        get_drive()
  3720.         num_drives()   set_drive()
  3721.  
  3722.         Field Input Routines
  3723.         ----------------------------------------
  3724.         cfield()       fbreakon()     fchar()        fcolor()
  3725.         ffill()        finptint()     finptintd()    finptintr()
  3726.         finptintrd()   finptstr()     finptstrd()    finptstre()
  3727.         finptstred()   finptyn()      finptynd()
  3728.  
  3729.         Graphics Routines
  3730.         ----------------------------------------
  3731.         gback()        gbox()         gcircle()      gdot()
  3732.         gfbox()        ginit()        gline()        gpal()
  3733.  
  3734.         Input Routines
  3735.         ----------------------------------------
  3736.         inptint()      inptintd()     inptintr()     inptintrd()
  3737.         inptstr()      inptstrd()     inptyn()       inptynd()
  3738.  
  3739.         Menu Routines
  3740.         ----------------------------------------
  3741.         pmclose()      pmcolor()      pmfunc()       pmopen()
  3742.         pmrun()
  3743.  
  3744.         Miscellaneous Routines
  3745.         ----------------------------------------
  3746.         beep()         dosver()       getpw()        istemplate()
  3747.         itofa()        ltofa()        mcolor()       setbeep()
  3748.         soundex()      wait_hs()
  3749.  
  3750.         Printer Routines
  3751.         ----------------------------------------
  3752.         lprint()       lprintf()      lputchar()     print_screen()
  3753.         prtrns()
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.                           C Spot Run - Documentation
  3764.  
  3765.  
  3766.         Screen Control and Output Routines
  3767.         ----------------------------------------
  3768.         border()       box()          cbox()         ccenter()
  3769.         ccls()         ccputs()       center()       centerf()
  3770.         cfield()       chline()       clreol()       cls()
  3771.         cvline()       message()      mscroll()      pmenu()
  3772.         pop_menu()     putat()        putatf()       putchc()
  3773.         putchci()      restore()      restore_screen()
  3774.         save()         save_screen()  scroll()       set_mode()
  3775.         vidblt()
  3776.  
  3777.         Sound Routines
  3778.         ----------------------------------------
  3779.         play()         sndout()       sndrstint()    sndsetint()
  3780.         sound()        sound_done()   sound_init()   sound_left()
  3781.         sound_quiet()  spkr_freq()    spkr_off()     spkr_on()
  3782.  
  3783.         String Routines
  3784.         ----------------------------------------
  3785.         match()        soundex()      strcen()       strght()
  3786.         strlft()       strtrm()
  3787.  
  3788.         System Clock Routines
  3789.         ----------------------------------------
  3790.         get_date()     get_dow()      get_time()     set_date()
  3791.         set_time()
  3792.  
  3793.         Timer Routines
  3794.         ----------------------------------------
  3795.         get_timer()    init_tmr()     read_tmr()     reset_tmr()
  3796.         start_tmr()    stop_tmr()     timer()        zero_tmr()
  3797.  
  3798.         Window Routines
  3799.         ----------------------------------------
  3800.         cmenu()        color()        dma()          fixcolor()
  3801.         retrace()      wactivate()    wblank()       wborder()
  3802.         wcenter()      wcenterf()     wclose()       wcloseall()
  3803.         wcls()         wcol()         wcolor()       wdelete()
  3804.         wfreeze()      wgotoxy()      whline()       whome()
  3805.         winsert()      wjump()        wmessage()     wmove()
  3806.         wopen()        wprint()       wprintc()      wprintf()
  3807.         wputat()       wputatf()      wputchar()     wrow()
  3808.         wscolor()      wscroll()      wtitle()       wvline()
  3809.  
  3810.         Window Field Input Routines
  3811.         ----------------------------------------
  3812.         wfbreakon()    wfchar()       wfcolor()      wffill()
  3813.         wfinptint()    wfinptintd()   wfinptintr()   wfinptintrd()
  3814.         wfinptstr()    wfinptstrd()   wfinptstre()   wfinptstred()
  3815.         wfinptyn()     wfinptynd()
  3816.  
  3817.         Window Input Routines
  3818.         ----------------------------------------
  3819.         winptint()     winptintd()    winptintr()    winptintrd()
  3820.         winptstr()     winptstrd()    winptyn()      winptynd()
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.                           C Spot Run - Documentation
  3830.  
  3831.  
  3832.                       Commonly Asked Questions and Answers
  3833.  
  3834.              What  follows is a collection of some of the  most  commonly 
  3835.         asked  questions, and the answers.  If you don't find the  answer 
  3836.         to your particular problem here, please feel free to call.
  3837.  
  3838.              Q:   Where  are  all the .OBJ files listed  on  the  routine 
  3839.         description pages?
  3840.  
  3841.              A:   All  of the object code files are placed into  an  .LIB 
  3842.         file.   Each of the .LIB files provided contains all of the  .OBJ 
  3843.         files listed.  The .OBJ file names are provided so users with the 
  3844.         source  code  can find the source modules and to allow  users  to 
  3845.         find out which modules are in the same files. 
  3846.  
  3847.  
  3848.              Q:   I want to use C Spot Run in an application I'm  writing 
  3849.         to sell commercially.  What do I need to do?
  3850.  
  3851.              A:  You need to obtain a commercial license for C Spot  Run, 
  3852.         which  costs  $75, and comply with the simple terms  in  the  CSR 
  3853.         commercial usage license.  (Section 2.5 of this manual.)
  3854.  
  3855.  
  3856.  
  3857.  
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.                          Routine/Utility Submission Form
  3899.  
  3900.  
  3901.         Name of Routine/Utility: ___________________________________
  3902.  
  3903.         Form(s) of Submission (C/ASM/OBJ/LIB/EXE/COM): _____________
  3904.  
  3905.  
  3906.         Are you releasing this  routine/utility to the Pubic  Domain 
  3907.  
  3908.         or under another program? (PD/Program):  ___________________
  3909.  
  3910.  
  3911.         If this  release is under a voluntary contribution  program, 
  3912.  
  3913.         what is the suggested contribution? ($): ___________________
  3914.  
  3915.  
  3916.         May we put your address in the author directory? (Y/N): ____
  3917.  
  3918.                                       Your phone number? (Y/N): ____
  3919.  
  3920.                                       Your data address? (Y/N): ____
  3921.  
  3922.  
  3923.              Name: _________________________________
  3924.  
  3925.           Address: _________________________________
  3926.  
  3927.              City: _____________________ State: ____  ZIP: _________
  3928.  
  3929.             Phone: (    )     -          Hours: ____________________
  3930.  
  3931.         Source ID: _______________  CompuServe ID: _________________
  3932.  
  3933.            Data #: (    )     -          Hours: ____________________
  3934.  
  3935.          Fido Net: ____ /_____            Baud: ____________________
  3936.  
  3937.         In  submitting  this form you place  your routine or utility 
  3938.         into the C Spot Run  C Add-on and Utility Library,  and give 
  3939.         permission  for it's  use as  specified  in  Appendix  C and
  3940.         sections one  and two of this manual.
  3941.  
  3942.         Please send this form via US Mail to the following  address,
  3943.         or via modem to the accompanying FidoNet address.
  3944.  
  3945.         Don't forget the description sheets, and of course the files
  3946.         you are submitting!
  3947.  
  3948.              C Spot Run
  3949.              New Dimension Software   FidoNet 107/414
  3950.                23 Pawtucket Drive      Data: (609) 354-9259
  3951.                Cherry Hill, NJ 08003
  3952.  
  3953.  
  3954.  
  3955.  
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.                                User Response Form
  3965.  
  3966.  
  3967.              We  would  like to hear from you,  and would appreciate  any 
  3968.         comments,  suggestions,  and/or donations.   Even if you are  not 
  3969.         making  a  donation  or contributing to  the  library,  we  would 
  3970.         appreciate some input,  and it helps us to know if the library is 
  3971.         serving  it's intended purpose,  and gives us some information on 
  3972.         our  users.   Of course this is voluntary,  but we hope you  will 
  3973.         take the time to fill out and mail this form.
  3974.  
  3975.         How did you obtain your copy of C Spot Run? ________________
  3976.  
  3977.         ____________________________________________________________
  3978.  
  3979.  
  3980.         What,  in your  opinion, are  the most  useful  routines and 
  3981.  
  3982.         utilities? _________________________________________________
  3983.  
  3984.  
  3985.         What do you think of the documentation? ____________________
  3986.  
  3987.         ____________________________________________________________
  3988.  
  3989.  
  3990.         Are  you enclosing  a contribution, and  if so, how much and
  3991.  
  3992.         why? _______________________________________________________
  3993.  
  3994.  
  3995.         Do you have any comments and/or suggestions? _______________
  3996.  
  3997.         ____________________________________________________________
  3998.  
  3999.         ____________________________________________________________
  4000.  
  4001.  
  4002.         Would you  like to be on a possible mailing list? (Y/N) ____
  4003.  
  4004.  
  4005.              Name: ________________________________________
  4006.  
  4007.           Company: ________________________________________
  4008.  
  4009.           Address: ________________________________________
  4010.  
  4011.              City: _____________________ State: ____  ZIP: _________
  4012.  
  4013.             Phone: (    )     -          Hours: ____________________
  4014.  
  4015.            Data #: (    )     -          Hours: ____________________
  4016.  
  4017.                                           Baud: ____________________
  4018.  
  4019.  
  4020.  
  4021.  
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.            Thank you, we hope you find the C Spot Run library of use.
  4032.  
  4033.         Please send this form via US Mail to the following  address,
  4034.         or via modem to the accompanying FidoNet address.
  4035.  
  4036.  
  4037.              C Spot Run
  4038.              New Dimension Software   FidoNet 107/414
  4039.                23 Pawtucket Drive      Data: (609) 354-9259
  4040.                Cherry Hill, NJ 08003
  4041.  
  4042.  
  4043.  
  4044.  
  4045.  
  4046.  
  4047.  
  4048.  
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.                                    Order Form
  4097.  
  4098.              NOTE:   Users  who receive source code may not  redistribute 
  4099.         it.  The code is for your use only, and the right to redistribute 
  4100.         is  not included in the purchase.   If two or more people will be 
  4101.         using  the  source,  rather  then ordering just one  copy  please 
  4102.         contact the author about a discount on several copies.
  4103.  
  4104.  
  4105.              (  )  I would like to register as a C Spot Run User, receive 
  4106.         complete source code on disk, update notifications, and be placed 
  4107.         on  whatever mailing list may be formed.   I am enclosing  a  $50 
  4108.         donation.
  4109.  
  4110.              (   )  I would like to register as a C Spot Run user with  a 
  4111.         commercial   license,   receiving   all  the  benefits  of   full 
  4112.         registration with permission to use C Spot Run commercially under 
  4113.         the  conditions set forth in section 2.5.   I am enclosing a  $75 
  4114.         donation.
  4115.  
  4116.              (   )   I would like to register as a C Spot  Run  User  and 
  4117.         receive  all the benfits of such status with the exception of the 
  4118.         source code.  I am enclosing a $15 donation.
  4119.  
  4120.  
  4121.              Name: ________________________________________
  4122.  
  4123.           Company: ________________________________________
  4124.  
  4125.           Address: ________________________________________
  4126.  
  4127.              City: _____________________ State: ____  ZIP: _________
  4128.  
  4129.             Phone: (    )     -          Hours: ____________________
  4130.  
  4131.            Data #: (    )     -          Hours: ____________________
  4132.  
  4133.                                           Baud: ____________________
  4134.  
  4135.  
  4136.              C Spot Run
  4137.              New Dimension Software   Voice: (609) 424-2595
  4138.                23 Pawtucket Drive      Data: (609) 354-9259
  4139.                Cherry Hill, NJ 08003
  4140.  
  4141.  
  4142.  
  4143.            +--------------------  NDS USE ONLY  --------------------+
  4144.            |                                                        |
  4145.            |  Recieved:  ____ /____ /____   Sent: ____ /____ /____  |
  4146.            |                                                        |
  4147.            |             Serial Number: ________________            |
  4148.            |                                                        |
  4149.            +--------------------------------------------------------+
  4150.  
  4151.  
  4152.  
  4153.  
  4154.  
  4155.  
  4156.  
  4157.  
  4158.  
  4159.